package
{
import com.societyGames.codeExercise.CodeExercise;
import com.societyGames.robotExercises.RobotCodeExercise;
import com.societyGames.robotExercises.RobotSimulation;

import flash.geom.Point;

public function goHome():void
{
  var robotSimulation:RobotSimulation = RobotCodeExercise(CodeExercise.instance).simulation;
  var homePosition:Point = robotSimulation.homePosition;
  var robotPosition:Point = robotSimulation.robotPosition;
  robotSimulation.move(
          homePosition.x - robotPosition.x,
          homePosition.y - robotPosition.y);
}
}
